import './assets/css/style.css'
import './assets/font/font.css'
import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import { createPinia } from 'pinia' //引入pinia
import leftTop from './views/left-top/index.vue'
import leftCenter from './views/left-center/index.vue'
import leftBottom from './views/left-bottom/index.vue'
import centerTop from './views/center-top/index.vue'
import rightTop from './views/right-top/index.vue'
import rightCenter from './views/right-center/index.vue'
import rightBottom from './views/right-bottom/index.vue'
import { vue3ScrollSeamless } from 'vue3-scroll-seamless'
const app = createApp(App)
app.component('Left-Top', leftTop)
app.component('Left-Center', leftCenter)
app.component('Left-Bottom', leftBottom)
app.component('Center-Top', centerTop)
app.component('Right-Top', rightTop)
app.component('Right-Center', rightCenter)
app.component('Right-Bottom', rightBottom)
app.component('vue3ScrollSeamless', vue3ScrollSeamless)
app.use(router)

app.directive('cover', {
  mounted(el, binding) {
    el.src = import.meta.env.VITE_APP_BASE_API + binding.value
  },
  updated(el, binding) {
    el.src = import.meta.env.VITE_APP_BASE_API + binding.value
  }
})
const pinia = createPinia() //创建pinia实例
app.use(pinia)
app.mount('#app')
